package cifrador.des;

import java.awt.CardLayout;


public class vista_Principal extends javax.swing.JFrame {
      Menu pantalla_inicial;
      PInicio p_encriptado;
      DInicio p_desincriptado;
      
    public vista_Principal() {
        initComponents();
        
          pantalla_inicial=new Menu(this.jPanel1);
          jPanel1.add(pantalla_inicial,"Menu");
          CardLayout cl = (CardLayout)(jPanel1.getLayout());
          cl.show(jPanel1,"Menu");
        
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setMaximumSize(new java.awt.Dimension(433, 291));
        jPanel1.setMinimumSize(new java.awt.Dimension(433, 291));
        jPanel1.setPreferredSize(new java.awt.Dimension(433, 291));
        jPanel1.setLayout(new java.awt.CardLayout());
        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 605, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

      
 
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

    public void encriptar() {
        
        p_encriptado= new PInicio();
        jPanel1.add(p_encriptado,"PInicio");
        CardLayout cl = (CardLayout)(jPanel1.getLayout());
        cl.show(jPanel1,"PInicio");
    }
}
